1. Technical Field
The present invention is directed to an apparatus and method for communicating the completion of asynchronous input/output in a data processing system.
2. Description of Related Art
Portable Operating System Interface for UNIX (POSIX) is an IEEE 1003.1 standard that defines the language interface between application programs and the UNIX operating system. Adherence to the standard ensures compatibility when programs are moved from one UNIX computer to another. POSIX provides a set of system calls for user applications to manage asynchronous input/output requests. In POSIX, the lio_listio( ) function call is used to initiate a group of input/output (I/O) requests. By input/output requests what is meant is a request to perform a read/write operation. The lio_listio( ) function call can either operate in a blocking or non-blocking manner. By xe2x80x9cblockingxe2x80x9d what is meant is that the lio_listio( ) function call does not return values to the calling application until all of the I/O requests are complete. In a xe2x80x9cnon-blockingxe2x80x9d operation, the lio_listio( ) function call can, in a user mode, poll for completed I/O requests or can issue a call to the aio_suspend( ) function in order to wait on a selected set of I/O requests to be completed.
The selected set of I/O requests that are to be completed is dependent on the particular application that calls the aio_suspend( ) function. For example, many on-line transaction processing middleware applications, such as Oracle database applications, initiate a group of I/O requests and would like to wait until 30% to 50% of the requests are completed. The application would like to continue to process other requests to achieve an enhanced throughput, however, this is not possible with the existing services provided by the POSIX asynchronous I/O system calls.
There are a number of factors that do not allow current POSIX asynchronous I/O system calls to facilitate enhanced throughput of applications. For example, the aio_suspend( ) function requires that the user build a list of control blocks, each associated with an I/O request that the user wishes to wait for completion. The moment any one of the control blocks for the I/O requests indicates the I/O request is complete, the aio_suspend( ) function returns to the calling application. If the number of I/O requests that have completed is not the required 30 to 50 percent, the application must again call the aio_suspend( ) function to again wait for the next I/O request in the list of I/O requests to complete. This may result in many calls to the aio_suspend( ) function and many returns to the calling application. Thus, for example, for a set of xe2x80x9cnxe2x80x9d I/O requests, the last I/O request in the list (nxe2x88x921) could complete and the aio_suspend( ) function would return to the calling application. On subsequent calls to aio_suspend( ), it is possible that the xe2x80x9cnxe2x88x922xe2x80x9d I/O request could complete and then the xe2x80x9cnxe2x88x923xe2x80x9d I/O could complete. This results in n2 calls to the aio_suspend( ) function.
Thus, a large amount of overhead costs, in terms of processing time, is encountered with the presently known POSIX asynchronous I/O system calls. Therefore, it would be beneficial to have an apparatus and method for communicating the completion of I/O requests in which the overhead of communicating the completion of the I/O requests is reduced.
The present invention provides an apparatus and method for communicating the completion of asynchronous I/O requests. In particular, the apparatus and method make use of a new function call which is capable of waiting for a predetermined number of I/O requests to be completed prior to returning to the calling application. Control blocks for the I/O requests are updated after a predetermined number of I/O requests have been completed, i.e. in a process context rather than in an interrupt context as in the known systems. In this way, the overhead associated with known asynchronous I/O system calls is reduced.